package com.jr.controller;


import com.google.gson.Gson;
import com.jr.entity.Job;
import com.jr.service.JobService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;


/**
 * 工作表
 *
 * @author Snoopy
 * @since 1.0.0 2022-12-31
 */
@RestController
public class JobController {
    @Autowired
    private JobService jobService;

    /**
     * 企业名称超链接页面跳转
     */
    @RequestMapping(value = "getAlljobs.do", produces = "text/html;charset=utf-8")
    public @ResponseBody String getAll() {

        List<Job> allJob = jobService.getAllJob();

        return new Gson().toJson(allJob);
    }
}